#include "../../include/robot/scanning.h"
using namespace std;

Scanning::Scanning():ArAction("actionScanning")
{
	cont = 120;
	cont1 = 0;
}

Scanning::~Scanning()
{
}

ArActionDesired* Scanning::fire(ArActionDesired currentDesired)
{

	myDesired.reset();
	if(cont<120){
		myDesired.setVel(1);
		myDesired.setDeltaHeading(10);
		cont++;
	}else{
		if(myDesired.getVel()!=400){
			myDesired.setVel(400);
		}
		cont1++;
		if(cont1==100){
			cont=0;
			cont1=0;
		}
	}
	return &myDesired;
}

